import http from "@/utils/request";

export function orderList(params) {
    return http.request({
        url: "/api/mobile/public/orderInfo/orderList",
        method: "get",
        params,
    });
}

export function orderDetail(params) {
    return http.request({
        url: "/api/mobile/public/orderInfo/orderDetail",
        method: "get",
        params,
    });
}
export function createOrder(params) {
    return http.request({
        url: "/api/mobile/public/orderInfo/createOrder",
        method: "post",
        data:params,
    });
}

export function deleteOrder(params) {
    return http.request({
        url: "/api/mobile/public/orderInfo/del",
        method: "get",
        params,
    });
}
export function confirmOrder(params) {
    return http.request({
        url: "/api/mobile/public/orderInfo/receipt",
        method: "get",
        params,
    });
}





//售后list
export function afterSalesList(params) {
    return http.request({
        url: "/api/mobile/public/orderRefund/refundList",
        method: "get",
        params,
    });
}
//退款详情
export function refundDetail(params) {
    return http.request({
        url: "/api/mobile/public/orderRefund/refundDetail",
        method: "get",
        params,
    });
}

//申请退款类型
export function getRefundTypeLi(params) {
    return http.request({
        url: "/api/mobile/public/orderRefund/getTypes",
        method: "get",
        params,
    });
}
//申请原因
export function applyDetail(params) {
    return http.request({
        url: "/api/mobile/public/orderRefund/apply",
        method: "get",
        params,
    });
}
//提交售后
export function submitAfterSales(params) {
    return http.request({
        url: "/api/mobile/public/orderRefund/submit",
        method: "post",
        data:params,
    });
}

//取消订单
export function cancelOrder(params) {
    return http.request({
        url: "/api/mobile/public/orderInfo/cancel",
        method: "get",
        params,
    });
}

//继续付款
export function continuePay(params) {
    return http.request({
        url: "/api/mobile/public/orderInfo/pay",
        method: "get",
        params,
    });
}

//图片上传
export function uploadImg(params) {
    return http.request({
        url: "/api/commons/file/uploadImg",
        method: "post",
        data:params,
    });
}